package zdream.pmfield.test.stage.battle;

import org.junit.Before;
import org.junit.Test;

import zdream.pmfield.data.foe.Foe;
import zdream.pmfield.data.foe.MoveTemplate;
import zdream.pmfield.stage.StageBuilderForTest;
import zdream.pmfield.stage.StageWrapper;
import zdream.pmfield.storage.FoeTemplateStorage;

import static org.junit.Assert.*;

/**
 * @author Zdream
 * @date 2023-12-22
 * @since 0.0.1
 */
public class Simple2v2BattleCase {
	FoeTemplateStorage storage;

	@Before
	public void before() {
		storage = new FoeTemplateStorage();
		storage.load();
	}

	@Test
	public void battle2v2() {
		MoveTemplate move = storage.findMoveById(1, 1);

		Foe foe1 = Foe.builder(storage.findFoeById(1))
				.withLevel(20)
				.withMove(move)
				.build();
		Foe foe4 = Foe.builder(storage.findFoeById(4))
				.withLevel(20)
				.withMove(move)
				.build();
		Foe foe7 = Foe.builder(storage.findFoeById(7))
				.withLevel(20)
				.withMove(move)
				.build();
		Foe foe133 = Foe.builder(storage.findFoeById(133))
				.withLevel(20)
				.withMove(move)
				.build();

		final StageWrapper wrapper = StageBuilderForTest.builder()
				.withStorage(storage)
				.putFoeToOneSide(foe1, foe7)
				.putFoeToAnotherSide(foe4, foe133)
				.buildWrapper();
		wrapper.onDefaultActionRequest();
		wrapper.printBeforeHandleMessage();
		wrapper.run();
	}
}
